package www.ld.com.domain.dto;


import lombok.Getter;
import lombok.Setter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;


@Getter
@Setter
public class PersonalInfoDTO extends User {
    private static final long serialVersionUID = 1L;
    private final String id;
    private final String name;

    public PersonalInfoDTO(
            String id,
            String name,
            String username,
            String password,
            boolean enabled,
            boolean accountNonExpired,
            boolean credentialsNonExpired,
            boolean accountNonLocked,
            Collection<? extends GrantedAuthority> authorities) {
        super(username,
                password,
                enabled,
                accountNonExpired,
                credentialsNonExpired,
                accountNonLocked,
                authorities);
        this.id = id;
        this.name = name;

    }

    public PersonalInfoDTO(
            String id, String name,
            String username, String password, Collection<? extends GrantedAuthority> authorities) {
        super(username,
                password,
                authorities);
        this.id = id;
        this.name = name;

    }
}
